<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.application.component.model');

class RestaurantsModelSingle extends JModel
{
	var $_comments = null;
	
	function &getComments()
	{
		$id = JRequest::getInt('id', 0);
		
		if (empty($this->_comments)) {
			$query = "SELECT full_name, comment_date, comment_text FROM #__reviews_comments WHERE review_id = '{$id}'";
			$this->_comments = $this->_getList($query);
		}
		
		return $this->_comments;
	}
}
